﻿<div class="page-heading">
		<h1>Sửa danh mục</h1>
</div>
<div class="page-content">
    <div class="error-box hidden" id="err-newsadd">
        
    </div>
    <form method="post" enctype="multipart/form-data">
        <input type="hidden" name="submit" value="true" />
        <input type="hidden" name="Id" value="" />
        <div class="admin-row">
            <div class="left"><label>Tên Danh Mục Tin (Tiếng Anh)</label></div>
            <div class="right"><input class="input" name="Name" value="{name}" type="text" /></div>
        </div>
        <div class="admin-row">
            <div class="left"><label>Tên Danh Mục Tin (Tiếng Việt)</label></div>
            <div class="right"><input class="input" name="viName" value="{viName}" type="text" /></div>
        </div>
        <div id="admin_banner" class="admin-row">
            <div class="left"><label>Hình ảnh</label></div>
            <div class="right">
                <img class="img_bigcat" alt="img" src="{ResourceUrl}/{image}" onerror="this.src='{ResourceUrl}/img/home/default.jpg';" />
                <input class="input" name="Image" type="file" />
            </div>
        </div>
        <div class="admin-row">
            <div class="left"><label>Thứ tự</label></div>
            <div class="right"><input class="input" name="Order" value="{order}" type="text" /></div>
        </div>
        <div class="admin-row">
            <div class="left">&nbsp;</div>
            <div class="right">
                <input class="button" type="submit" value="Lưu lại" />
                <a class="button" onclick="location='{BaseUrl}/admin/catnews'">Hủy bỏ</a>
            </div>
        </div> 
    </form>

    <table id="subcats" border="0" width="100%" cellpadding="0" cellspacing="0" class="list-table">
        <thead>
            <tr>
                <th class="table-header-check">ID</th>
                <th class="table-header-repeat line-left minwidth-2"><span class="th">Tên danh mục con</span></th>
                <th class="table-header-repeat line-left">Sửa</th>
            </tr>
        </thead>
        <tbody>    
            <fly:list data="subcats">
                <tr>
                    <td align="center">{subcats.id}</td>
                    <td>{subcats.name}</td>
                    <td class="options-width">
					    <a href="{BaseUrl}/admin/editnewscat/{subcats.id}" title="Sửa" class="icon-1 info-tooltip"></a>
                        <a onclick="return confirm('Bạn có chắc chắn muốn xóa?')" href="{BaseUrl}/admin/deletesubcat/{subcats.id}" title="Xóa" class="icon-2 info-tooltip"></a>
			        </td>
                </tr>
            </fly:list>
        </tbody>
    </table>

    <a id="admin_addcat" class="button" href="{BaseUrl}/admin/addsubcat/{editcat_id}">Thêm danh mục con</a>
</div>
